-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add method to use latex(pdf) or ascii(rfc) for math #50
Conversation
Makefile
Outdated
@@ -8,20 +8,20 @@ $(info RFC rendering has been tested with mmark version 1.3.4 and xml2rfc 2.5.1, | |||
all: ffv1.html ffv1.pdf draft-niedermayer-cellar-ffv1-01.html draft-niedermayer-cellar-ffv1-01.txt | |||
|
|||
ffv1.html: ffv1.md | |||
cat pdf_frontmatter.md "$<" pdf_backmatter.md > merged_ffv1html.md | |||
cat pdf_frontmatter.md "$<" pdf_backmatter.md | grep -v "^RFC:" | sed "s|PDF:||g" > merged_ffv1html.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^PDF:
(and also below)
4fadd0b
to
b21fff1
Compare
I updated the grep/sed process per @TimothyGu's comment. I also added code-block ticks around the equations in the RFC presentation (I think they look better in the txt and html rfc output this way). |
Some questions based on this. The "Range binary values" section contains the most complex math:
In the Context section:
|
"^" to me is pow() or XOR, The arrows and |Q| seem fine to me, i dont know how others see all these ... |
I reviewed this more closely and force pushed an update. I caught a few typos and replace the "^" with XOR. I also found two instances in the latex equations were slice_x and slice_y were producing the y and x in subscript. I fixed these by using I removed the "WIP" from the title of the pull request as I'm reasonable certain that this is okay. The one area I'm hesitant about is using a new
Please review. |
ping? |
I agree with using XOR, which is clear. I’m afraid, to me the use of In my opinion, |
@retokromer, Any suggestion for an ascii equivalent to the use of subscripts? |
@dericed In typewriter is was one single step down… I personally use |
going typewriter-style and including the subscript on the next line with indentation is tricky here because the equations already need more than a single wrap, so it would need to be clear what is line wrap and what is subscript. I like the idea of A_ij as it's cleaner, but in this case would lead to things like |
In case anyone prefers this, here's an example of an equation redone with line-wrapping plus single-step-down for subscript:
|
What about a mix of the two styles?
|
The mix does seem more intuitive but may perhaps be harder to explain. Any other votes for preference? |
prefix a line with either “PDF:” or “RFC:”, the prefixes will be removed and the lines that don’t match the output will be dropped. This allowed support of both latex and ascii outputs. Comments? Particularly about the use of the seq() function?
Hi, all I force updated the PR after another round of revisions. For the RFC output (not the non-RFC PDF output) I defined this syntax in the mathematical function section:
and then used that rather than subscript on multiple lines. I also focused on alignment to make line wrapping more sensible. Examples of the output for the RFC are:
and
After the prior attempts and getting advice from other RFC authors that have tried to negotiate equations into RFC, I think this is about as good as possible in ASCII. Any advice on the phrasing of the mathematical functions I added, (a_{b})? |
LGTM, yet I would personally write
is ASCII art. |
Your example is 8 characters too wide for an RFC. |
would fit, but is less readable :-( OK with your version! |
patch applied |
This makes ffv1.md quite ugly: for example: https://github.com/FFmpeg/FFV1/blob/master/ffv1.md |
Agreed, though the RFC output looks quite better while the PDF output is the same. Since the PDF and RFC are more official while the md is more like source code, this approach seemed a good compromise to me if we want to simultaneously support both the LaTeX features of PDF and the ascii style of RFC. |
ah i see more what you mean, that the PDF and RFC versions of the equation are put on the same line in the markdown rendering. I think I can fix that with spacing, will test soon. |
prefix a line with either “PDF:” or “RFC:”, the prefixes will be
removed and the lines that don’t match the output will be dropped. This
allowed support of both latex and ascii outputs. Comments? Particularly
about the use of the seq() function?